package com.qezhhnjy.demo.async;

import com.qezhhnjy.demo.async.simple.SimpleAsync;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

/**
 * @author zhaoyangfu - 2021/1/4 13:16
 */
@SpringBootApplication
public class AsyncApplication implements CommandLineRunner {

    @Resource
    private SimpleAsync simpleAsync;

    public static void main(String[] args) {
        SpringApplication.run(AsyncApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        simpleAsync.first();
        simpleAsync.first();
        simpleAsync.first();
        simpleAsync.first();
        simpleAsync.first();
        simpleAsync.first();
        simpleAsync.first();
        simpleAsync.first();
        simpleAsync.first();
        simpleAsync.first();
        simpleAsync.first();
        simpleAsync.first();
    }
}
